package com.learm.socket.AIO;

import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousServerSocketChannel;
import java.nio.channels.CompletionHandler;

public class AcceptCompletionHandler implements CompletionHandler {
    @Override
    public void completed(Object result, Object attachment) {

        ((AsyncTimeServerHandler)attachment).asynchronousServerSocketChannel.accept(attachment, this);
        ByteBuffer buffer = ByteBuffer.allocate(1024);
//        ((AsynchronousServerSocketChannel) result).read

    }

    @Override
    public void failed(Throwable exc, Object attachment) {

    }
}
